﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;

namespace SchoolManagement.UI.UI_Forms
{
    public partial class FrmStartbar : Form
    {
        frmSchoolMaster schoolmaster_Instance;
        frmLogin Login_Instance;
        frmTeacherMaster TeacherMaster_Instance;
        frmInward Inward_Instance;
        frmScholarship Scholarship_Instance;
        frmConcession Concession_Instance;
        frmTeacherAllotment TeacherAllotment_Instance;
        frmStandard StandardMaster_Instance;
        frmOutward Outword_instance;
        ContractorMaster ContractorMaster_instance;
        BusEntry BusEntry_Instance;
        DockPanel docking;
        public FrmStartbar(DockPanel dockpane1)
        {
            InitializeComponent();
            docking = dockpane1;
        }

        private void FrmStartbar_Deactivate(object sender, EventArgs ae)
        {
            this.Hide();
        }

        private void button_SchoolMaster_Click(object sender, EventArgs e)
        {
            if (schoolmaster_Instance == null || IsDisposed)
                schoolmaster_Instance = new frmSchoolMaster();
            schoolmaster_Instance.Show(docking,DockState.Document);
        }

        private void button_Login_Click(object sender, EventArgs e)
        {
            if (Login_Instance == null || IsDisposed)
                Login_Instance = new frmLogin();
            Login_Instance.Show();
        }

        private void button_TeacherMaster_Click(object sender, EventArgs e)
        {
            if(TeacherMaster_Instance==null||IsDisposed)
                TeacherMaster_Instance=new frmTeacherMaster();
            TeacherMaster_Instance.Show(docking, DockState.Document);
        }

        private void button_Inward_Click(object sender, EventArgs e)
        {
            if (Inward_Instance == null || IsDisposed)
                Inward_Instance = new frmInward();
            Inward_Instance.Show(docking, DockState.Document);
        }

        private void button_Scholarship_Click(object sender, EventArgs e)
        {
            if (Scholarship_Instance == null || IsDisposed)
                Scholarship_Instance = new frmScholarship();
            Scholarship_Instance.Show(docking, DockState.Document);
        }

        private void button_Concession_Click(object sender, EventArgs e)
        {
            if (Concession_Instance == null || IsDisposed)
                Concession_Instance = new frmConcession();
            Concession_Instance.Show(docking, DockState.Document);
        }

        private void button_TeacherAllot_Click(object sender, EventArgs e)
        {
            if (TeacherAllotment_Instance == null || IsDisposed)
                TeacherAllotment_Instance = new frmTeacherAllotment();
            TeacherAllotment_Instance.Show(docking, DockState.Document);
        }

        private void button_StandardMaster_Click(object sender, EventArgs e)
        {
            if (StandardMaster_Instance == null || IsDisposed)
                StandardMaster_Instance = new frmStandard();
            StandardMaster_Instance.Show(docking, DockState.Document);
        }

        private void button_Outword_Click(object sender, EventArgs e)
        {
            if (Outword_instance == null || IsDisposed)
                Outword_instance = new frmOutward();
            Outword_instance.Show(docking, DockState.Document);
        }

        private void button_Contractor_Click(object sender, EventArgs e)
        {
            if (ContractorMaster_instance == null || IsDisposed)
                ContractorMaster_instance = new ContractorMaster();
            ContractorMaster_instance.Show(docking, DockState.Document);
        }

        private void button_BusEntry_Click(object sender, EventArgs e)
        {
            if (BusEntry_Instance == null || IsDisposed)
                BusEntry_Instance = new BusEntry();
            BusEntry_Instance.Show(docking, DockState.Document);
        }

        

        

        
    }
}
